export const tableColumns = [
  {
    name: '预警日期',
    value: 'alertDate',
    align: 'center',
    minWidth: '80px'
  },
  {
    name: '预警公司',
    value: 'alertCompany',
    align: 'left'
  },
  {
    name: '预警规则',
    value: 'ruleId',
    align: 'left',
    minWidth: '180px'
  },
  {
    name: '预警值',
    value: 'alertValue',
    align: 'left',
    minWidth: '180px'
  },
  {
    name: '预警结果',
    value: 'alertResultDes',
    align: 'center',
    minWidth: '60px',
    formatter(row) {
      switch (row.alertResult) {
        case '0':
          row.alertResultDes = '不通过'
          break
        case '1':
          row.alertResultDes = '通过'
          break
      }
      return row.alertResultDes
    }
  }
]
function _debounce(fn) {
  var timer = null
  return function () {
    var _this = this
    var args = arguments
    if (timer) clearTimeout(timer)
    timer = setTimeout(function () {
      fn.apply(_this, args)
    })
  }
}
export {
  _debounce
}
